#include<stdio.h>

int main()
{
	float km,p;
	printf("请输入公里数:");
	scanf("%f",&km);
	if(km <= 3)
		p = 10;
	else if(km > 3)
		if(km - (int)km != 0)
			{
				p = 10 + (int)(km-3+1) * 2;
			}	
		else
			{
				p = 10 + (km-3) *2;
			}
	printf("乘车费用为%.1f\n",p);
	
	return 0;
}
